import axios from "axios";
const requests = axios.create({
    baseURL: "/api",
    timeout: 5000,
});
requests.interceptors.request.use(
    (config) => {
        return config;
    },
    (err) => {
        return Promise.reject(err);
    }
);
requests.interceptors.response.use(
    (res) => {
        return res.data.data;
    },
    (err) => {
        return Promise.reject(err);
    }
);
export default requests;